package com.wwdx.model;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.wwdx.utils.ConstantHolder;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.*;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 优惠券日志表实体类
 * @author liguoliang
 */
@Table(name = "wwdx_coupon_log")
@Entity
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class WwdxCouponLogModel implements Serializable{

    @Id
    @GeneratedValue
    private Long id;
    private String name;
    private String unionid;
    private Integer status;
    private BigDecimal price;
    @Column(name = "gmt_created",updatable = false)
    @JsonFormat(pattern = ConstantHolder.Constant.LOCAL_DATE_PATTERN2)
    private Date gmtCreated;
    @JsonIgnore
    @Column(name = "gmt_modified")
    private Date gmtModified;

    @Transient
    private String userName;
    @Transient
    private String date;
    @Transient
    private String dateEnd;
}